package com.softeem.score.model.enmu;

public enum CourseBelongingEnum {
    compulsoryPublic(1, "公共必修课"),
    compulsoryAllDepartments(2, "院系必修课"),
    ElectiveDepartment(3, "院系选修课"),
    PublicElective(4, "公共选修课(其他类)"),
    PublicElectiveScienceEthics(5, " 公共选修课(科学伦理类)"),
    PublicElectiveHistory(6, "公共选修课(四史类)"),
    PublicElectiveNationalSecurityEducation(7, "公共选修课(国家安全教育类)"),
    PublicElectiveAestheticEducation(8, "公共选修课(美育类)"),
    PublicElectiveBigDataArtificialIntelligence(9, "公共选修课(大数据、人工智能类)"),
    PublicElectiveEnvironmentalProtection(10, "公共选修课(绿色环保类)");
    private final int id;
    private final String value;

    CourseBelongingEnum(int id, String value) {
        this.id = id;
        this.value = value;
    }

    public int getId() {
        return id;
    }

    public String getValue() {
        return value;
    }

    // 根据ID获取对应的枚举值
    public static CourseBelongingEnum getById(int id) {
        for (CourseBelongingEnum belonging : values()) {
            if (belonging.id == id) {
                return belonging;
            }
        }
        throw new IllegalArgumentException("Invalid CourseBelongingEnum ID: " + id);
    }


}
